Emmanuel Gil Peyrot [Sun, 21 Mar 2021 20:02:08 +0000 (20:02 +0000)]
gdkglcontext-wayland: Fallback to GLES 2.0 after legacy failed
This lets the NGL backend be selected instead of the Cairo backend on
devices which expose both GL and GLES, but have better support of GLES.
Tested on a PinePhone.
Piotr Drąg [Sat, 20 Mar 2021 14:41:34 +0000 (15:41 +0100)]
Update Polish translation
Emmanuele Bassi [Sat, 20 Mar 2021 12:31:10 +0000 (12:31 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!3324
Emmanuele Bassi [Sat, 20 Mar 2021 12:18:42 +0000 (12:18 +0000)]
docs: Put core deps below UI links
We assume people will be more interested in GTK if they get to
docs.gtk.org.
Emmanuele Bassi [Sat, 20 Mar 2021 12:18:26 +0000 (12:18 +0000)]
docs: Fix typo in the docs landing page
Yuri Chornoivan [Sat, 20 Mar 2021 08:54:01 +0000 (08:54 +0000)]
Update Ukrainian translation
Yuri Chornoivan [Sat, 20 Mar 2021 08:51:46 +0000 (08:51 +0000)]
Update Ukrainian translation
Emmanuele Bassi [Fri, 19 Mar 2021 22:31:37 +0000 (22:31 +0000)]
Merge branch 'a11y-strdup' into 'master'
a11y: Don't copy attribute names in attribute sets
See merge request GNOME/gtk!3323
Matthias Clasen [Fri, 19 Mar 2021 21:00:04 +0000 (17:00 -0400)]
a11y: Don't copy attribute names in attribute sets
We only need these names when serializing a11y information
for tests. And copying these strings is entirely unnecessary.
So, just pass a callback instead.
Matthias Clasen [Fri, 19 Mar 2021 18:59:33 +0000 (18:59 +0000)]
Merge branch 'ngl-glyph-cache' into 'master'
Ngl glyph cache
See merge request GNOME/gtk!3322
Matthias Clasen [Fri, 19 Mar 2021 18:30:19 +0000 (14:30 -0400)]
ngl: Improve the glyph front cache
The effectiveness of the front cache is limited by
subpixel positioning making it very likely that we
will meet the same glyph in different x phases inside
a single line of text.
Factoring the xphase into the front cache key makes things
better. For the string
eeeeeeeeeeeeeeeeeee
before: 0% front cache hits
after: >90% front cache hits
Matthias Clasen [Fri, 19 Mar 2021 18:05:15 +0000 (14:05 -0400)]
ngl: Drop an unused struct member
GskNglGlyphLibrary.hash_table wasn't used.
Matthias Clasen [Fri, 19 Mar 2021 18:04:27 +0000 (14:04 -0400)]
texttag: A few typo fixes
Emmanuele Bassi [Fri, 19 Mar 2021 17:57:42 +0000 (17:57 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!3321
Emmanuele Bassi [Fri, 19 Mar 2021 17:23:46 +0000 (17:23 +0000)]
docs: Restructure the list of UI libraries
Put GTK at the top.
Emmanuele Bassi [Fri, 19 Mar 2021 17:23:29 +0000 (17:23 +0000)]
docs: Fix typo in the docs landing page
Matthias Clasen [Fri, 19 Mar 2021 17:17:02 +0000 (13:17 -0400)]
Revert "ngl: Remove duplicate check"
This reverts commit
1fd534ef1ee0f5e62dbdcf1f82ed7dc287d77d13.
This change revealed that we are not treating damage regions
correctly, and we regularly end up with
Emmanuele Bassi [Fri, 19 Mar 2021 14:55:12 +0000 (14:55 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Fix the landing page structure
See merge request GNOME/gtk!3320
Emmanuele Bassi [Fri, 19 Mar 2021 14:36:34 +0000 (14:36 +0000)]
Fix the landing page structure
Emmanuele Bassi [Fri, 19 Mar 2021 14:14:46 +0000 (14:14 +0000)]
Merge branch 'pages-index' into 'master'
Add a landing page for the GitLab pages root
See merge request GNOME/gtk!3319
Emmanuele Bassi [Fri, 19 Mar 2021 13:54:32 +0000 (13:54 +0000)]
Add a landing page for the GitLab pages root
Right now, we land inside a 404 if we go to:
https://gnome.pages.gitlab.gnome.org/gtk/
as we have all our API references in a sub-level. We should have a
landing page for the root, similar to developer.gnome.org/references/.
Matthias Clasen [Fri, 19 Mar 2021 05:44:39 +0000 (05:44 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!3317
Matthias Clasen [Fri, 19 Mar 2021 00:30:29 +0000 (20:30 -0400)]
text tag: Typo fix
Matthias Clasen [Fri, 19 Mar 2021 00:30:07 +0000 (20:30 -0400)]
Cosmetics
Remove a stale comment.
Matthias Clasen [Fri, 19 Mar 2021 00:16:59 +0000 (20:16 -0400)]
Cosmetics
Pack the GtkTextAttributes struct better.
Matthias Clasen [Thu, 18 Mar 2021 23:44:21 +0000 (19:44 -0400)]
release script: Include gi-docgen
This lets us say 'you don't need to package this'
about gi-docgen.
Matthias Clasen [Fri, 19 Mar 2021 02:01:34 +0000 (02:01 +0000)]
Merge branch 'ngl-by-default' into 'master'
gsk: Make ngl the default OpenGL renderer
See merge request GNOME/gtk!3313
Matthias Clasen [Fri, 19 Mar 2021 01:59:29 +0000 (01:59 +0000)]
Merge branch 'wip/chergert/fix-ngl-cache-eviction' into 'master'
fix ngl cache eviction
Closes #3771
See merge request GNOME/gtk!3316
Christian Hergert [Fri, 19 Mar 2021 00:54:48 +0000 (17:54 -0700)]
ngl: clear Glyph front cache at the beginning of a frame
We don't want to be responsible for duplicating the effort of the hash
table, we just want to speed up subsequent lookups. Otherwise, we risk
not marking glyph usage when tracking usage for compaction.
Christian Hergert [Fri, 19 Mar 2021 00:53:37 +0000 (17:53 -0700)]
ngl: implement atlas compaction
This required finishing up the begin_frame/end_frame semantics for
GskNglTextureLibraryw which was apparently overlooked.
The driver was changed to provide more information to the library when
beginning frames. We do not need to use end_frame so that was removed.
The frame age is the same as GL (60) but I do wonder if that is based
on seconds if we should be using something longer for situations where
we have higher frame rates.
Fixes #3771
Matthias Clasen [Thu, 18 Mar 2021 21:43:14 +0000 (21:43 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
inspector: Respect GDK_DEBUG=vulkan-disable
Closes #3748
See merge request GNOME/gtk!3312
Matthias Clasen [Thu, 18 Mar 2021 21:42:35 +0000 (21:42 +0000)]
Merge branch 'bilelmoussaoui/4.2-annotations' into 'master'
IMContext: add since annotations to the new APIs
See merge request GNOME/gtk!3315
Bilal Elmoussaoui [Thu, 18 Mar 2021 21:25:38 +0000 (22:25 +0100)]
IMContext: add since annotations to the new APIs
Matthias Clasen [Thu, 18 Mar 2021 03:27:41 +0000 (23:27 -0400)]
gsk: Make ngl the default OpenGL renderer
We will keep the original GL renderer around for
a while, to have an alternative. But we want to
get wider testing of the new renderer.
Matthias Clasen [Thu, 18 Mar 2021 17:55:26 +0000 (17:55 +0000)]
Merge branch 'wip/chergert/fix-3770' into 'master'
ngl: ensure vertices buffer allocates enough vertices
Closes #3770
See merge request GNOME/gtk!3314
Christian Hergert [Thu, 18 Mar 2021 17:43:24 +0000 (10:43 -0700)]
ngl: ensure vertices buffer allocates enough vertices
It's not guaranteed that a single power of two growth will be enough.
Fixes #3770
Matthias Clasen [Thu, 18 Mar 2021 04:14:25 +0000 (00:14 -0400)]
Cosmetics
Pango lets us pass NULL for the font desc and language
in pango_context_get_font_metrics() to use the context
values.
Matthias Clasen [Thu, 18 Mar 2021 03:19:08 +0000 (23:19 -0400)]
inspector: Respect GDK_DEBUG=vulkan-disable
Respect the debug settings for disabling Vulkan or GL,
and do not try to initialize those contexts. This can
be necessary to work around crashes.
Fixes: #3748
Matthias Clasen [Thu, 18 Mar 2021 00:31:10 +0000 (00:31 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #3765
See merge request GNOME/gtk!3311
Matthias Clasen [Wed, 17 Mar 2021 22:16:47 +0000 (18:16 -0400)]
label: Fix tooltips on links
Fix pointed out by Timm Baeder.
Fixes: #3765
Matthias Clasen [Wed, 17 Mar 2021 20:26:40 +0000 (16:26 -0400)]
media: Always use GL with gstreamer
As long as we can create a GL context, pass one to
gstreamer. This at least gets us GL textures with
the ngl renderer, the previous code was arbitrarily
refusing that.
Timm Bäder [Wed, 17 Mar 2021 16:04:57 +0000 (16:04 +0000)]
Merge branch 'gsk-border-node-diff-fix-typo' into 'master'
Fix a typo in gsk_border_node_diff
See merge request GNOME/gtk!3310
Andrey Kozlovskiy [Wed, 17 Mar 2021 15:38:01 +0000 (15:38 +0000)]
Fix a typo in gsk_border_node_diff
Typo was introduced in !3278 and results in an incorrect handling of different uniformity.
Emmanuele Bassi [Wed, 17 Mar 2021 14:09:37 +0000 (14:09 +0000)]
Merge branch 'select-list-model-null' into 'master'
gtk: Allow selection models to take null list model during construction
See merge request GNOME/gtk!3309
Matthias Clasen [Wed, 17 Mar 2021 12:32:45 +0000 (12:32 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #3763
See merge request GNOME/gtk!3308
Matthias Clasen [Wed, 17 Mar 2021 11:56:07 +0000 (07:56 -0400)]
lpr: Fix various compiler warnings
gcc 11 is warning about some const mixups here.
Fix them.
Matthias Clasen [Wed, 17 Mar 2021 11:51:27 +0000 (07:51 -0400)]
treestore: Initialize some local variables
gcc 11 is warning that these might be used uninitialized
otherwise.
Matthias Clasen [Wed, 17 Mar 2021 11:50:24 +0000 (07:50 -0400)]
sizerequest: Avoid a corner case
gcc 11 warns that the code isn't safe when
n_requested_sizes is 0. Add a precondition check
to make it clear that that never happens.
Matthias Clasen [Wed, 17 Mar 2021 11:49:06 +0000 (07:49 -0400)]
cssshadowvalue: Handle error condition propertly
We were parsing off the end of our array before noticing
that we've gone too far. gcc 11 warns about this.
Matthias Clasen [Wed, 17 Mar 2021 11:37:33 +0000 (07:37 -0400)]
checkbutton: Add a warning about cyclic groups
Setting up check or toggle button group relationships
in a cycle will lead to lockups. Add a warning about
this, and catch the simplest case with a precondition
check.
Fixes: #3763
Matthias Clasen [Tue, 16 Mar 2021 21:22:45 +0000 (17:22 -0400)]
Drop the gtk-doc subproject
No longer used.
Balázs Úr [Tue, 16 Mar 2021 23:49:27 +0000 (23:49 +0000)]
Update Hungarian translation
Matthias Clasen [Tue, 16 Mar 2021 19:12:05 +0000 (19:12 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
dnd: Add some warnings to the docs
See merge request GNOME/gtk!3305
Matthias Clasen [Tue, 16 Mar 2021 18:24:04 +0000 (14:24 -0400)]
dnd: Add some warnings to the docs
Add some warnings about pitfalls of the async dnd api.
Matthias Clasen [Tue, 16 Mar 2021 11:43:06 +0000 (11:43 +0000)]
Merge branch 'kjellahl/cairo-subproject' into 'master'
Fix build when cairo is a subproject
See merge request GNOME/gtk!3304
Kjell Ahlstedt [Tue, 16 Mar 2021 08:52:13 +0000 (09:52 +0100)]
meson: Find libcairo-script-interpreter when cairo is a subproject
If cairo is a subproject, it's not necessarily installed when gtk
is built. In the build tree, libcairo-script-interpreter is not stored
in the same directory as other cairo libraries.
Kjell Ahlstedt [Tue, 16 Mar 2021 08:51:40 +0000 (09:51 +0100)]
gdkglcontext-x11: Don't assume that cairo-xlib.h is in cairo directory
If cairo is a subproject, it's not necessarily installed when gtk
is built. In the source tree, cairo's headers are not stored in
a directory called 'cairo'.
Matthias Clasen [Mon, 15 Mar 2021 22:32:23 +0000 (22:32 +0000)]
Merge branch 'fix-3581' into 'master'
gdkcursor-win32.c: Add cursor map for all-scroll (issue #3581)
Closes #3581
See merge request GNOME/gtk!3298
Matthias Clasen [Mon, 15 Mar 2021 22:31:08 +0000 (22:31 +0000)]
Merge branch 'fix-wayland-layout-changes' into 'master'
Fix wayland layout changes
See merge request GNOME/gtk!3303
Matthias Clasen [Mon, 15 Mar 2021 19:23:00 +0000 (15:23 -0400)]
wayland: Fix cross-layout accelerators
GTK traditionally lets you activate keyboard shortcuts
even if they are for a non-active layout. But it is meant
to only activate with a keysym from a non-active layout
when that symbol is not present in the current layout.
That last condition was lost when key event handling
was redone for GTK4. Bring it back.
Matthias Clasen [Mon, 15 Mar 2021 16:55:44 +0000 (12:55 -0400)]
wayland: Add debug spew for active keyboard layouts
Print out what we think the active keyboard layout is,
when it changes, with GDK_DEBUG=input.
Jason Francis [Mon, 15 Mar 2021 13:30:33 +0000 (09:30 -0400)]
gtk: Allow selection models to take null list model during construction
This brings it in line with the documentation, and with the respective
set_model() functions.
Matthias Clasen [Mon, 15 Mar 2021 19:28:17 +0000 (19:28 +0000)]
Merge branch 'issue-3757' into 'master'
docs: Update annotations for WidgetClass.query_action()
Closes #3757
See merge request GNOME/gtk!3301
Matthias Clasen [Mon, 15 Mar 2021 16:34:23 +0000 (12:34 -0400)]
wayland: Emit keys-changed on layout changes
We were forgetting to do this in when layout changes are
communicated via handle_modifiers.
Emmanuele Bassi [Mon, 15 Mar 2021 13:48:35 +0000 (13:48 +0000)]
docs: Update annotations for WidgetClass.query_action()
The parameter_type and property_name out arguments can be set to NULL.
Fixes: #3757
Milo Casagrande [Mon, 15 Mar 2021 09:25:11 +0000 (09:25 +0000)]
Update Italian translation
(cherry picked from commit
affeff5472868b797b6ab16a9ffa6cab74148106)
Chun-wei Fan [Mon, 15 Mar 2021 09:04:21 +0000 (17:04 +0800)]
gdkcursor-win32.c: Add cursor map for all-scroll
This makes sure that we don't have cursors disappearing on Windows upon
scrolling because we can't find a cursor that exists on the system during
a scroll, and unlike GTK-3.x, we do not default to the arrow pointer on GTK4.
Just mimic what we have on X11 and Wayland: the trusty standard arrow pointer.
Fixes issue #3581.
Matthias Clasen [Mon, 15 Mar 2021 03:33:10 +0000 (23:33 -0400)]
release-script: Actually compress the docs tarball
Somehow an x got lot and the tarball got very big. Oops...
Benjamin Otte [Mon, 15 Mar 2021 02:31:45 +0000 (02:31 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!3297
Benjamin Otte [Mon, 15 Mar 2021 02:16:50 +0000 (03:16 +0100)]
x11: Don't call _gdk_surface_update_size() all the time
We were calling _gdk_surface_update_size() every frame, even if the
window size didn't change. This would cause us to discard all cached
buffers and redraw the whole screen.
This was BAD.
Benjamin Otte [Mon, 15 Mar 2021 01:56:28 +0000 (02:56 +0100)]
surface: Remove unused gdk_surface_get_unscaled_size()
Also remove unscaled_width/height members in the win32 backend.
Both of those are unused.
Matthias Clasen [Sun, 14 Mar 2021 23:13:10 +0000 (19:13 -0400)]
4.1.2
Matthias Clasen [Mon, 15 Mar 2021 01:35:44 +0000 (21:35 -0400)]
Update release script
With gi-docgen based docs, we can try to go back to
including the docs in the main release tarball.
Matthias Clasen [Mon, 15 Mar 2021 01:27:45 +0000 (01:27 +0000)]
Merge branch 'menubar-accel' into 'master'
window: Add a way to disable F10 shortcut
Closes #3727
See merge request GNOME/gtk!3296
Benjamin Otte [Tue, 9 Mar 2021 20:05:49 +0000 (21:05 +0100)]
ngl: Remove duplicate check
We check the extents, so there's no need to check overlap before.
Matthias Clasen [Sun, 14 Mar 2021 23:37:11 +0000 (19:37 -0400)]
window: Add a way to disable F10 shortcut
This is needed for terminal emulators.
Fixes: #3727
Matthias Clasen [Sun, 14 Mar 2021 21:04:37 +0000 (21:04 +0000)]
Merge branch 'ngl-less-shaders' into 'master'
Assorted ngl improvements
See merge request GNOME/gtk!3295
Matthias Clasen [Sun, 14 Mar 2021 04:30:18 +0000 (23:30 -0500)]
ngl: Special-case css backgrounds
Recognize a common pattern: A rounded clip with
a color node, followed by a border node, with the
same outline. This is what CSS backgrounds frequently
produce, and we can render it more efficiently with
a combined shader.
Matthias Clasen [Sat, 13 Mar 2021 23:40:37 +0000 (18:40 -0500)]
ngl: Don't bother with uniform border nodes
Now that colors aren't uniforms anymore, we don't
win much by using the inset_shadow shader. The fragment
shaders of inset_shadow and border are identical. And
the regular border setup does nine-slicing.
Matthias Clasen [Sat, 13 Mar 2021 23:21:45 +0000 (18:21 -0500)]
ngl: Small shader improvements
Add a variant of gskSetOutputColor that saves a
few multiplications, and use it where possible.
Matthias Clasen [Sat, 13 Mar 2021 23:04:26 +0000 (18:04 -0500)]
ngl: Improve the coloring shader
Since we are now passing a float anyway, we can avoid
the branch in the fragment shader.
Matthias Clasen [Sat, 13 Mar 2021 22:54:15 +0000 (17:54 -0500)]
ngl: Improve the gradient shaders
Use a define for MAX_COLOR_STOPS, and give the loop
a fixed limit.
Matthias Clasen [Sat, 13 Mar 2021 19:36:03 +0000 (14:36 -0500)]
ngl: Rewrite gsk_ngl_render_job_visit_text_node
Make this more compact, and thus easier to read.
Matthias Clasen [Sat, 13 Mar 2021 19:29:34 +0000 (14:29 -0500)]
ngl: Drop gsk_ngl_render_job_set_color
Colors are not state that we carry across draw ops,
so setting the color on the render job doesn't make
much sense. Instead, pass the color to the various
draw calls. Add a few new ones for that purpose.
Also, shorten the names of some by going from
'load_vertices_from_offscreen' to 'draw_offscreen'.
Matthias Clasen [Sat, 13 Mar 2021 18:40:04 +0000 (13:40 -0500)]
ngl: Refactor gsk_ngl_render_job_visit_border_node
With color sorting out of the picture, this can
be much simpler.
Matthias Clasen [Sat, 13 Mar 2021 15:17:34 +0000 (10:17 -0500)]
ngl: Consistently use gsk_scaled_premultiply
Its not going to make much of a difference, but we
can just as well be consistent.
Matthias Clasen [Sun, 14 Mar 2021 04:38:54 +0000 (23:38 -0500)]
ngl: Fix up uniform enums
This got messed up when color was changed from
a uniform to an attribute in
06d5c8e72dee3d6339.
Jiri Grönroos [Sun, 14 Mar 2021 17:02:46 +0000 (17:02 +0000)]
Update Finnish translation
(cherry picked from commit
f5a34b53afed6f75a257c21dc52b07592ea76681)
Guillaume Bernard [Sun, 14 Mar 2021 13:37:57 +0000 (13:37 +0000)]
Update French translation
(cherry picked from commit
21039681d6df9824599d186934aaa53fd4ba722f)
Piotr Drąg [Sun, 14 Mar 2021 12:30:26 +0000 (13:30 +0100)]
Update Polish translation
Marek Černocký [Sun, 14 Mar 2021 08:28:17 +0000 (09:28 +0100)]
Updated Czech translation
Matthias Clasen [Sat, 13 Mar 2021 22:27:04 +0000 (22:27 +0000)]
Merge branch 'gles-coloring' into 'master'
ngl: Fix the coloring shader on GLES 2.0
See merge request GNOME/gtk!3294
Emmanuel Gil Peyrot [Sat, 13 Mar 2021 22:00:54 +0000 (22:00 +0000)]
ngl: Fix the coloring shader on GLES 2.0
Integer varyings didn’t exist in GLSL ES 1.00, neither did the flat
attribute.
Kjartan Maraas [Sat, 13 Mar 2021 16:04:48 +0000 (16:04 +0000)]
Update Norwegian Bokmål translation
(cherry picked from commit
70ee21db71e5b8de0aff406d3d9f1decddebfa09)
Matthias Clasen [Sat, 13 Mar 2021 12:36:56 +0000 (12:36 +0000)]
Merge branch 'ebassi/for-master' into 'master'
docs: Fix the dependencies links
See merge request GNOME/gtk!3284
Matthias Clasen [Sat, 13 Mar 2021 12:33:15 +0000 (12:33 +0000)]
Merge branch 'ngl-textview-cursor' into 'master'
Ngl textview cursor
See merge request GNOME/gtk!3292
Matthias Clasen [Sat, 13 Mar 2021 00:44:31 +0000 (19:44 -0500)]
textview: Fix blinking block cursors
When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.
Matthias Clasen [Sat, 13 Mar 2021 00:44:31 +0000 (19:44 -0500)]
textview: Fix blinking block cursors
When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.
Matthias Clasen [Sat, 13 Mar 2021 00:28:36 +0000 (19:28 -0500)]
textlayout: Render cursors at the end
Don't place the insertion cursor render nodes in the
middle of the text nodes for all the text. This helps
the renderer batching the text draw calls together.
Matthias Clasen [Fri, 12 Mar 2021 23:26:15 +0000 (18:26 -0500)]
ngl: Fix up some debug printouts